home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form Form1
- Caption = "Demo MenuX.Ocx"
- ClientHeight = 4230
- ClientLeft = 705
- ClientTop = 1380
- ClientWidth = 7710
- Height = 4920
- Left = 645
- LinkTopic = "Form1"
- ScaleHeight = 4230
- ScaleWidth = 7710
- Top = 750
- Width = 7830
- Begin VB.CommandButton Command3
- Caption = "Load"
- Height = 255
- Left = 5400
- TabIndex = 4
- TabStop = 0 'False
- Top = 3960
- Width = 735
- End
- Begin VB.CommandButton Command2
- Caption = "About"
- Height = 255
- Left = 6960
- TabIndex = 3
- TabStop = 0 'False
- Top = 3980
- Width = 735
- End
- Begin VB.CommandButton Command1
- Caption = "Clear"
- Height = 255
- Left = 6180
- TabIndex = 1
- TabStop = 0 'False
- Top = 3980
- Width = 735
- End
- Begin VB.ListBox List1
- Height = 3960
- IntegralHeight = 0 'False
- Left = 0
- TabIndex = 0
- TabStop = 0 'False
- Top = 0
- Width = 6255
- End
- Begin MENUXLib.MenuX MenuX1
- Left = 6480
- Top = 2160
- _Version = 65536
- _ExtentX = 1931
- _ExtentY = 1720
- _StockProps = 0
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Height = 255
- Left = 0
- TabIndex = 2
- Top = 3975
- Width = 5415
- End
- Begin VB.Menu tmp
- Caption = "tmp"
- End
- Attribute VB_Name = "Form1"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Private Sub Command1_Click()
- MenuX1.Clear
- End Sub
- Private Sub Command2_Click()
- MenuX1.AboutBox
- End Sub
- Private Sub Command3_Click()
- a$ = InputBox$("Filename", "Load")
- If Len(a$) Then MenuX1.Load a$
- End Sub
- Private Sub Form_Load()
- MenuX1.hWnd = Me.hWnd
- MenuX1.Load "test.menu"
- End Sub
- Private Sub Form_Resize()
- If Me.WindowState = 1 Then Exit Sub
- If Me.ScaleHeight < 500 Then Exit Sub
- If Me.ScaleWidth < 1500 Then Exit Sub
- List1.Width = Me.ScaleWidth
- List1.Height = Me.ScaleHeight - Label1.Height
- Label1.Top = Me.ScaleHeight - Label1.Height
- Label1.Width = Me.ScaleWidth - Command1.Width * 3 - 50
- Command1.Left = Label1.Width + 50 + Command1.Width
- Command1.Top = Me.ScaleHeight - Label1.Height
- Command2.Left = Label1.Width + 50
- Command2.Top = Me.ScaleHeight - Label1.Height
- Command3.Left = Label1.Width + 50 + Command1.Width * 2
- Command3.Top = Me.ScaleHeight - Label1.Height
- End Sub
- Private Sub List1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
- If Button = 2 Then MenuX1.PopupMenu 200, 0, X / Screen.TwipsPerPixelX, Y / Screen.TwipsPerPixelY
- End Sub
- Private Sub MenuX1_Help(ByVal id As Integer)
- MsgBox "Hilfe-Nummer" + Str$(id), , "Hilfe"
- End Sub
- Private Sub MenuX1_Click(ByVal id As Integer)
- List1.AddItem MenuX1.Caption(id)
- List1.TopIndex = List1.ListCount - 1
- End Sub
- Private Sub MenuX1_Select(ByVal id As Integer)
- Label1.Caption = MenuX1.Caption(id)
- End Sub
-